<template>
	<view>
		<view class="header status_bar" :class="scrrol == true ? 'scrrolHeader' : ''">
			<view class="back iconfont icon-xiangzuo1" @tap="backPage"></view>
			<view class="text" :class="scrrol == true ? 'scrrolHeader' : ''">订单详情</view>
		</view>
		<view class="bg_box">
			<image class="bg01" :src="getImgSrc('/static/bg02.png')" mode="widthFix"></image>
			<view class="bg_content">
				
				
				
				<view class="details_box">
					<view class="details_title">申请进度</view>

					<!-- 退款 -->
					<view class="schedule_box" v-if="info.order_status==6">
						<view class="schedule_list" v-if="info.refund_state == 2">
							<view class="line_box">
								<view class="round"></view>
								<view class="line"></view>
							</view>
							<view class="text_box">
								<view class="title">退款成功</view>
								<view class="value">正在放款中，快至当天到账，请耐心等待。放款成功
									后，我们会第一时间通知您,请注意查收信息
								</view>
								<view class="time">{{info.updated_at}}</view>
							</view>
						</view>
						<view class="schedule_list" v-if="info.refund_state == 1">
							<view class="line_box">
								<view class="round"></view>
								<view class="line"></view>
							</view>
							<view class="text_box">
								<view class="title">退款失败</view>
								<view class="rule">退款失败
								</view>
								<view class="time">{{info.updated_at}}</view>
							</view>
						</view>
					</view>

					<!-- 发票 -->
					<view class="schedule_box">
						<view class="schedule_list">
							<view class="line_box">
								<view class="round"></view>
								<view class="line"></view>
							</view>
							<view class="text_box" v-if="info.invoice_status ==0">
								<view class="value">未申请开票</view>
								<view class="time"></view>
							</view>
							<view class="text_box" v-if="info.invoice_status ==1">
								<view class="value">发票生成中</view>
								<view class="time">{{info.invoice_time}}</view>
							</view>
							<view class="text_box" v-if="info.invoice_status ==2">
								<view class="value">发票已生成</view>
								<view class="time">{{info.invoice_open}}</view>
							</view>
						</view>
					</view>

					<!-- 失败 -->
					<!-- <view class="schedule_box">
						<block v-for="(item, index) in 3" :key="index">
							<view class="schedule_list">
								<view class="line_box">
									<view class="close iconfont icon-guanbi1"></view>
									<view class="line"></view>
								</view>
								<view class="text_box">
									<view class="value">退款失败</view>
									<view class="rule" v-if="index == 0">驳回原因：经审核资料信息不一致</view>
									<view class="time">2024-04-19 10:24:00</view>
								</view>
							</view>
						</block>
					</view> -->
				</view>

				<view class="details_box">
					<view class="details_title">商品信息</view>
					<view class="order_list">
						<view class="order_text">
							<view class="text_box">
								<view class="title_box">
									<view class="title">{{info.system_name}}</view>
									<view class="type">{{info.status_cn}}</view>
								</view>
								<view class="text"></view>
							</view>
							<view class="order_img">
								<image :src="info.img" mode="widthFix"></image>
							</view>
						</view>
						<view class="standing">
							<view class="content_box" v-html="detail"></view>
						</view>
					</view>
				</view>

				<view class="details_box">
					<view class="details_title">订单信息 </view>
					<view class="list">
						<view class="name">订单编号</view>
						<input disabled="true" type="text" v-model="order_no" value="" placeholder="请输入"
							placeholder-style="color:#B5B5B5" />
					</view>
					<view class="list">
						<view class="name">真实姓名</view>
						<input disabled="true" type="text" v-model="contract_name" value="" placeholder="请输入"
							placeholder-style="color:#B5B5B5" />
					</view>
					<view class="list">
						<view class="name">手机号码</view>
						<input disabled="true" type="text" v-model="phone" value="13064582315" placeholder="请输入"
							placeholder-style="color:#B5B5B5" />
					</view>
					<view class="list">
						<view class="name">企业名称</view>
						<input disabled="true" type="text" v-model="tenant_name" value="13064582315" placeholder="请输入"
							placeholder-style="color:#B5B5B5" />
					</view>
					<view class="list">
						<view class="name">备注</view>
						<input disabled="true" type="text" value="13064582315" placeholder="请输入"
							placeholder-style="color:#B5B5B5" />
					</view>

				</view>

				

				<view class="clear_box"></view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				page: 1,
				scrrol: false,
				info: '',
				id:0,
				detail:'',
				order_no:'',
				contract_name:'',
				phone:'',
				remark:'',
				tenant_name:'',
			}
		},
		onLoad(e) {
			let that = this;
			that.id = e.id;
			that.loadData();
		},
		methods: {
			loadData() {
				let that = this;
				that.Net._get('auth/order/detail', {id:that.id}, res => {
					if (res.code == 200) {
						that.info = res.data;
						that.detail = res.data.system_info.detail;
						that.order_no = res.data.order_no;
						that.contract_name = res.data.contract_name;
						that.phone = res.data.phone;
						that.remark = res.data.memo;
						that.tenant_name = res.data.tenant_name;
					}
				});
			},
			backPage() {
				uni.navigateBack({});
			},
			gotopage(e) {
				let url = e.currentTarget.dataset.url;
				uni.navigateTo({
					url: url
				});
			},

		},
		onPageScroll: function(Object) {
			//console.log(Object.scrollTop); //实时获取到滚动的值
			if (Object.scrollTop > 28) {
				this.scrrol = true;
				/* #ifdef APP-PLUS */
				/* #endif */
			} else if (Object.scrollTop < 28) {
				this.scrrol = false;
				/* #ifdef APP-PLUS */
				/* #endif */
			}
		},
		onReachBottom() {
			var that = this;
			that.page++;
			// that.Net._get('shop_goods', {per_page:'10',page:that.page,}, res => {
			//   if (res.code == 200) {
			//     //console.log(res)
			//     if (res.data.data == '') {
			//       uni.showToast({
			//         title: '已经是最后一页了',
			//         duration: 2000,
			//         icon: 'none'
			//       });
			//     } else {
			//       that.info = that.info.concat(res.data.data); //将数据拼接在一起
			//     }
			//   } else if (res.code == 0) {
			//     that.Msg.Success(res.msg, res => {});
			//   }
			// });
		},
	}
</script>

<style>
	.header {
		background-color: transparent !important;
	}

	.header .text {
		background-color: transparent !important;
		color: #333 !important;
	}
	
	.header .back {
		color: #333 !important;
	}

	.scrrolHeader {
		background-color: #FEF2E2 !important;
	}

	.bg_box {
		width: 100%;
		position: relative;
	}

	.bg_box .bg01 {
		width: 100%;
	}

	.bg_box .bg_content {
		width: 92%;
		position: absolute;
		left: calc(50% - 46%);
		top: calc(13.5vw + var(--status-bar-height));
		z-index: 98;
	}

	.details_box {
		width: 100%;
		margin-top: 4%;
		background-color: #fff;
		padding: 5vw 4%;
		border-radius: 3vw;
	}

	.details_box .details_title {
		font-size: 4.2vw;
		color: #333;
		font-weight: bold;
		margin-bottom: 5vw;
	}

	.schedule_box {
		width: 100%;
	}

	.schedule_list {
		width: 100%;
		display: flex;
		align-items: center;
		position: relative;
	}

	.schedule_list .line_box {
		height: 100%;
		width: 5vw;
		position: absolute;
		left: 0;
		top: 0;
	}

	.schedule_list .line_box .round {
		width: 2.5vw;
		height: 2.5vw;
		margin: 0 auto;
		border-radius: 50%;
		background-color: #E9E9E9;
		margin-top: 1vw;
	}

	.schedule_list .line_box .close {
		width: 2.5vw;
		height: 2.5vw;
		margin: 0 auto;
		background-color: #E9E9E9;
		margin-top: 1vw;
		color: transparent;
		border-radius: 50%;
	}

	.schedule_list .line_box .line {
		width: 2px;
		margin: 0 auto;
		height: calc(100% - 1.25vw);
		background-color: #E9E9E9;
	}

	.schedule_box .schedule_list:nth-child(1) .line_box .round {
		border: 1.4vw solid #FC5D20;
		width: 5vw;
		height: 5vw;
	}

	.schedule_box .schedule_list:nth-child(1) .line_box .close {
		width: 5vw;
		height: 5vw;
		margin: 0 auto;
		border: 50%;
		background-color: #FF4246;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #fff;
		font-size: 2.5vw;
	}

	.schedule_box .schedule_list:last-child .line_box .line {
		display: none;
	}

	.schedule_list .text_box {
		flex: 1;
		min-height: 20vw;
		padding-left: 8vw;
	}

	.schedule_list .text_box .title {
		font-size: 3.6vw;
		color: #C0C0C0;
		margin-bottom: 1vw;
	}

	.schedule_list .text_box .value {
		font-size: 3.4vw;
		color: #C0C0C0;
		line-height: 6vw;
	}


	.schedule_list .text_box .rule {
		font-size: 3.3vw;
		color: #FF4246;
		margin-top: 1vw;
	}

	.schedule_list .text_box .time {
		font-size: 3.2vw;
		color: #CACACA;
		margin-top: 1vw;
	}
	
	.schedule_box .schedule_list:nth-child(1) .text_box .title {
		color: #333;
	}

	.schedule_box .schedule_list:nth-child(1) .text_box .value {
		color: #333;
	}

	.schedule_box .schedule_list:nth-child(1) .text_box .time {
		color: #999;
	}

	.schedule_box .schedule_list:last-child .text_box {
		min-height: auto;
	}

	.order_list {
		width: 100%;
		margin: 4% auto 0;
		background-color: #fff;
		border-radius: 3vw;
		box-sizing: border-box;
	}

	.order_list .order_text {
		width: 100%;
		display: flex;
		align-items: center;
	}

	.order_list .order_text .order_menu {
		font-size: 3.5vw;
		color: #fff;
		background-color: #FC5D20;
		height: 9vw;
		border-radius: 9vw;
		width: 20vw;
		display: flex;
		align-items: center;
		justify-content: center;
		font-weight: bold;
	}

	.order_list .order_text .order_menu02 {
		background-color: #FF4246;
	}

	.order_list .order_text .text_box {
		flex: 1;
	}

	.order_list .order_text .text_box .title_box {
		width: 100%;
		display: flex;
		align-items: center;
	}

	.order_list .order_text .text_box .title_box .title {
		font-size: 5vw;
		font-weight: bold;
		color: #333;
		margin-right: 3vw;
	}

	.order_list .order_text .text_box .title_box .type {
		height: 5vw;
		padding: 0 1.5vw;
		border-radius: 0.8vw;
		font-size: 3vw;
		letter-spacing: 1px;
		font-weight: bold;
		color: #fff;
		background-color: #5F6488;
		transform: skew(-15deg);
		display: flex;
		align-items: center;
	}

	.order_list .order_text .text_box .text {
		width: 100%;
		font-size: 3.5vw;
		color: #666666;
		margin-top: 2vw;
	}

	.order_list .order_text .order_img {
		width: 28vw;
		margin-left: 3vw;
	}

	.order_list .order_text .order_img image {
		width: 100%;
	}

	.order_list .rule_box {
		font-size: 3.3vw;
		font-weight: bold;
		height: 10vw;
		padding: 0 4%;
		display: flex;
		align-items: center;
		margin-top: 4%;
		border-radius: 2vw;
	}

	.ruleGo {
		background-color: #F7FEFB !important;
		color: #1FC092 !important;
	}

	.ruleNo {
		background-color: #FFF9F9 !important;
		color: #FF4246 !important;
	}

	.order_list .standing {
		width: 100%;
		padding: 3vw;
		border-radius: 2vw;
		background-color: #F8F8F8;
		margin-top: 4%;
	}

	.order_list .standing .stand {
		color: #666;
		font-size: 3.5vw;
		margin-top: 1vw;
	}

	.order_list .standing .stand:nth-child(1) {
		margin-top: 0;
	}

	.order_list .tips {
		font-size: 2.8vw;
		color: #FC5D20;
		margin-top: 4%;
	}

	.order_list .menu_box {
		width: 100%;
		margin-top: 4%;
		display: flex;
		align-items: center;
	}

	.order_list .menu_box .icon {
		font-size: 5vw;
		margin-right: 1vw;
	}

	.order_list .menu_box .icon01 {
		color: #1FC092;
	}

	.order_list .menu_box .icon02 {
		color: #FC5D20;
	}

	.order_list .menu_box .menu_text {
		font-size: 3.5vw;
		color: #666;
		margin-right: 1vw;
	}

	.order_list .menu_box .menu_num {
		flex: 1;
		font-size: 3.8vw;
		color: #333;
		font-weight: bold;
		margin-right: 1vw;
	}

	.order_list .menu_box .menu_period {
		font-size: 3.5vw;
		color: #666;
	}

	.order_list .menu_box .menu {
		font-size: 3.5vw;
		color: #fff;
		background-color: #1FC092;
		height: 9vw;
		border-radius: 9vw;
		width: 20vw;
		display: flex;
		align-items: center;
		justify-content: center;
		font-weight: bold;
	}

	.details_box .list {
		width: 100%;
		padding: 5vw 0;
		border-bottom: 1px solid #F3F3F3;
		display: flex;
		align-items: center;
	}

	.details_box .list .name {
		font-size: 3.8vw;
		color: #333;
		margin-right: 4vw;
	}

	.details_box .list input {
		flex: 1;
		font-size: 3.5vw;
		color: #333;
		margin-right: 3vw;
		text-align: right;
	}

	.details_box .list .arrow {
		font-size: 3.5vw;
		color: #B5B5B5;
	}
	
	.loan_box{
		width: 100%;
		background-color: #fff;
		border-radius: 3vw;
		padding-bottom: 3vw;
	}
	
	.loan_box .loan{
		background-color: #FC5D20;
		border-radius: 3vw;
	}
	
	.loan_box .loan .title{
		padding-left: 6vw;
		height: 20vw;
		line-height: 20vw;
		width: 100%;
		font-size: 6vw;
		color: #fff;
		font-weight: bold;
	}
	
	.loan_box .loan .money_box{
		width: 100%;
		height: 13vw;
		display: flex;
		align-items: center;
		border-radius: 0 0 3vw 3vw;
		background-color: #EF581E;
		padding: 0 6vw;
	}
	
	.loan_box .loan .money_box .money{
		font-size: 3.8vw;
		color: #fff;
		font-weight: bold;
		flex: 1;
	}
	
	.loan_box .loan .money_box .time{
		font-size: 3.8vw;
		color: #fff;
		font-weight: bold;
		flex: 1;
	}
	
	.loan_box .loan .money_box .time:nth-child(2){
		text-align: right;
	}
	
	.loan_box .bank_box{
		width: calc(100% - 6vw);
		height: 15vw;
		margin: 3vw auto 0;
		padding: 0 4vw;
		background-color: #F9F9F9;
		display: flex;
		align-items: center;
	}
	
	.loan_box .bank_box .text{
		font-size: 3.6vw;
		color: #333;
		font-weight: bold;
	}
	
	.loan_box .bank_box .bank{
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: flex-end;
	}
	
	.loan_box .bank_box .bank .i{
		width: 5vw;
		margin-right: 1vw;
	}
	
	.loan_box .bank_box .bank .i image{
		width: 100%;
	}
	
	.loan_box .bank_box .bank .t{
		font-size: 3.6vw;
		color: #333;
		font-weight: bold;
	}
	
	.content_box{
		margin-top: 5vw;
	}
	
</style>